home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / Turbo C v3.0 / DYNPOINT.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-17  |  609 b   |  27 lines

  1. // Borland C++ - (C) Copyright 1991 by Borland International
  2.  
  3. // DPOINT.CPP -- exercise in Getting Started
  4.  
  5. #include <iostream.h>
  6. #include <graphics.h>
  7. #include <conio.h>
  8. #include "figures.h"
  9.  
  10. int main()
  11. {
  12. // Assign pointer to dynamically allocated object; call constructor
  13. Point *APoint = new Point(50, 100);
  14.  
  15. // initialize the graphics system
  16. int graphdriver = DETECT, graphmode;
  17. initgraph(&graphdriver, &graphmode, "..\\bgi");
  18.  
  19. // Demonstrate the new object
  20. APoint->Show();
  21. cout << "Note pixel at (50,100). Now, hit any key...";
  22. getch();
  23. delete APoint;
  24. closegraph();
  25. return(0);
  26. }
  27.